home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 46 / Amiga Format CD46 (1999-10-20)(Future Publishing)(GB)[!][issue 1999-12].iso / -in_the_mag- / reader_requests / scilab / tests / calpol.tst < prev    next >
Text File  |  1999-09-16  |  13KB  |  260 lines

  1. //
  2. deff('[ok]=cmpr(h1,h2,eps)',['h1=h1-h2;';
  3.          'if norm(coeff(h1(2)))>eps then ok=0,else ok=1,end'])
  4. comp(cmpr)
  5. s=poly(0,'s');
  6. //
  7. //rationals
  8. //
  9. num=1;den=1+s;
  10. eps=5000*%eps;
  11. if cmpr(num/den,tlist('r',num,den,[]),eps)<>1 then pause,end
  12. if cmpr(den\num,tlist('r',num,den,[]),eps)<>1 then pause,end
  13. if cmpr(num./den,tlist('r',num,den,[]),eps)<>1 then pause,end
  14. if cmpr(den.\num,tlist('r',num,den,[]),eps)<>1 then pause,end
  15. num=1.5+s**3;
  16. if cmpr(num/den,tlist('r',num,den,[]),eps)<>1 then pause,end
  17. if cmpr(den\num,tlist('r',num,den,[]),eps)<>1 then pause,end
  18. if cmpr(num./den,tlist('r',num,den,[]),eps)<>1 then pause,end
  19. if cmpr(den.\num,tlist('r',num,den,[]),eps)<>1 then pause,end
  20. //
  21. h1=num/den;x=1.5;
  22. if cmpr(h1+x,tlist('r',num+x*den,den,[]),eps)<>1 then pause,end
  23. if cmpr(x+h1,tlist('r',num+x*den,den,[]),eps)<>1 then pause,end
  24. if cmpr(h1-x,tlist('r',num-x*den,den,[]),eps)<>1 then pause,end
  25. if cmpr(x-h1,tlist('r',-num+x*den,den,[]),eps)<>1 then pause,end
  26.  
  27. x=1.5+3*s;
  28. if cmpr(h1+x,tlist('r',num+x*den,den,[]),eps)<>1 then pause,end
  29. if cmpr(x+h1,tlist('r',num+x*den,den,[]),eps)<>1 then pause,end
  30. if cmpr(h1-x,tlist('r',num-x*den,den,[]),eps)<>1 then pause,end
  31. if cmpr(x-h1,tlist('r',-num+x*den,den,[]),eps)<>1 then pause,end
  32. y=s**3;h2=x/y;
  33. if cmpr(h1+h2,tlist('r',num*y+x*den,den*y,[]),eps)<>1 then pause,end
  34. if cmpr(h1-h2,tlist('r',num*y-x*den,den*y,[]),eps)<>1 then pause,end
  35. //
  36. // concatenations
  37. //
  38. h1=num/den;x=1.5;
  39. if cmpr([h1,x],tlist('r',[num,x],[den,1],[]),eps)<>1 then pause,end
  40. if cmpr([x,h1],tlist('r',[x,num],[1,den],[]),eps)<>1 then pause,end
  41. if cmpr([h1;x],tlist('r',[num;x],[den;1],[]),eps)<>1 then pause,end
  42. if cmpr([x;h1],tlist('r',[x;num],[1;den],[]),eps)<>1 then pause,end
  43. x=1.5+3*s;
  44. if cmpr([h1,x],tlist('r',[num,x],[den,1],[]),eps)<>1 then pause,end
  45. if cmpr([x,h1],tlist('r',[x,num],[1,den],[]),eps)<>1 then pause,end
  46. if cmpr([h1;x],tlist('r',[num;x],[den;1],[]),eps)<>1 then pause,end
  47. if cmpr([x;h1],tlist('r',[x;num],[1;den],[]),eps)<>1 then pause,end
  48. y=-0.5+s**3;h2=x/y;
  49. if cmpr([h1,h2],tlist('r',[num,x],[den,y],[]),eps)<>1 then pause,end
  50. if cmpr([h1;h2],tlist('r',[num;x],[den;y],[]),eps)<>1 then pause,end
  51. h1=[num/den,den/num];x=[0.3 1.5];
  52. if cmpr([h1,x],tlist('r',[h1(2),x],[h1(3),ones(x)],[]),eps)<>1 then pause,end
  53. if cmpr([x,h1],tlist('r',[x,h1(2)],[ones(x),h1(3)],[]),eps)<>1 then pause,end
  54. if cmpr([h1;x],tlist('r',[h1(2);x],[h1(3);ones(x)],[]),eps)<>1 then pause,end
  55. if cmpr([x;h1],tlist('r',[x;h1(2)],[ones(x);h1(3)],[]),eps)<>1 then pause,end
  56. h1=[num/den;den/num];x=[0.3;-1.5];
  57. if cmpr([h1,x],tlist('r',[h1(2),x],[h1(3),ones(x)],[]),eps)<>1 then pause,end
  58. if cmpr([x,h1],tlist('r',[x,h1(2)],[ones(x),h1(3)],[]),eps)<>1 then pause,end
  59. if cmpr([h1;x],tlist('r',[h1(2);x],[h1(3);ones(x)],[]),eps)<>1 then pause,end
  60. if cmpr([x;h1],tlist('r',[x;h1(2)],[ones(x);h1(3)],[]),eps)<>1 then pause,end
  61. x=[1.5+3*s;-1+s**3];
  62. if cmpr([h1,x],tlist('r',[h1(2),x],[h1(3),ones(x)],[]),eps)<>1 then pause,end
  63. if cmpr([x,h1],tlist('r',[x,h1(2)],[ones(x),h1(3)],[]),eps)<>1 then pause,end
  64. if cmpr([h1;x],tlist('r',[h1(2);x],[h1(3);ones(x)],[]),eps)<>1 then pause,end
  65. if cmpr([x;h1],tlist('r',[x;h1(2)],[ones(x);h1(3)],[]),eps)<>1 then pause,end
  66. h1=[num/den,den/num];x=[1.5+3*s,-1+s**2];
  67. if cmpr([h1,x],tlist('r',[h1(2),x],[h1(3),ones(x)],[]),eps)<>1 then pause,end
  68. if cmpr([x,h1],tlist('r',[x,h1(2)],[ones(x),h1(3)],[]),eps)<>1 then pause,end
  69. if cmpr([h1;x],tlist('r',[h1(2);x],[h1(3);ones(x)],[]),eps)<>1 then pause,end
  70. if cmpr([x;h1],tlist('r',[x;h1(2)],[ones(x);h1(3)],[]),eps)<>1 then pause,end
  71. h1=[num/den;den/num];y=-0.5+s**3;h2=[num/y;y*y/(y+1)];
  72. if cmpr([h1,h2],tlist('r',[h1(2),h2(2)],[h1(3),h2(3)],[]),eps)<>1 then pause,end
  73. if cmpr([h1;h2],tlist('r',[h1(2);h2(2)],[h1(3);h2(3)],[]),eps)<>1 then pause,end
  74. h1=[num/den,den/num];y=-0.5+s**3;h2=[num/y,y*y/(y+1)];
  75. if cmpr([h1,h2],tlist('r',[h1(2),h2(2)],[h1(3),h2(3)],[]),eps)<>1 then pause,end
  76. if cmpr([h1;h2],tlist('r',[h1(2);h2(2)],[h1(3);h2(3)],[]),eps)<>1 then pause,end
  77. //
  78. // extraction
  79. //
  80. h1=[num/den,den/num];
  81. if cmpr(h1(1,1),num/den,eps)<>1 then pause,end
  82. if cmpr(h1(1,1:2),h1,eps)<>1 then pause,end
  83. if cmpr(h1(1,[2 1]),[den/num,num/den],eps)<>1 then pause,end
  84. h1=[num/den;den/num];
  85. if cmpr(h1(2,1),den/num,eps)<>1 then pause,end
  86. if cmpr(h1(1:2,1),h1,eps)<>1 then pause,end
  87. if cmpr(h1([2 1],1),[den/num;num/den],eps)<>1 then pause,end
  88. y=-0.5+s**3;h1=[num/den,den/num];h2=[num/den,den/num;num/y,y*y/(y+1)];
  89. if cmpr(h2(2,1),num/y,eps)<>1 then pause,end
  90. if cmpr(h2(1:2,1:2),h2,eps)<>1 then pause,end
  91. if cmpr(h2([2 1],1),[num/y;num/den],eps)<>1 then pause,end
  92. if cmpr(h2(:,1),[num/den;num/y],eps)<>1 then pause,end
  93. if cmpr(h2(2,:),[num/y,y*y/(y+1)],eps)<>1 then pause,end
  94. if cmpr(h2(:,:),h2,eps)<>1 then pause,end
  95. //
  96. // insertions
  97. //
  98. h1=[num/den,den/num];x=0.33;
  99. hh=h1;hh(1,1)=x;if cmpr(hh,[x,h1(1,2)],eps)<>1 then pause,end;
  100. x=[-2.67 0.8];
  101. hh=h1;hh(1,1:2)=x;if cmpr(hh,x,eps)<>1 then pause,end;
  102. hh=h1;hh(1,[2 1])=x;if cmpr(hh,x([2,1]),eps)<>1 then pause,end;
  103. hh=h1;hh(1,[2;1])=x;if cmpr(hh,x([2,1]),eps)<>1 then pause,end;
  104. hh=h1;hh(1,:)=x;if cmpr(hh,x,eps)<>1 then pause,end;
  105. hh=h1;hh(:,:)=x;if cmpr(hh,x,eps)<>1 then pause,end;
  106. h1=[num/den;den/num];x=0.33;
  107. hh=h1;hh(1,1)=x;if cmpr(hh,[x;h1(2,1)],eps)<>1 then pause,end;
  108. x=[-2.67;0.8];
  109. hh=h1;hh(1:2,1)=x;if cmpr(hh,x,eps)<>1 then pause,end;
  110. hh=h1;hh(:,1)=x;if cmpr(hh,x,eps)<>1 then pause,end;
  111. hh=h1;hh(:,:)=x;if cmpr(hh,x,eps)<>1 then pause,end;
  112. hh=h1;hh([2 1],1)=x;if cmpr(hh,x([2 1]),eps)<>1 then pause,end;
  113. hh=h1;hh([2;1],1)=x;if cmpr(hh,x([2 1]),eps)<>1 then pause,end;
  114.  
  115. h1=[num/den,den/num];x=0.33*s+1;
  116. hh=h1;hh(1,1)=x;if cmpr(hh,[x,h1(1,2)],eps)<>1 then pause,end;
  117. x=[-2.67 0.8+s**3];
  118. hh=h1;hh(1,1:2)=x;if cmpr(hh,x,eps)<>1 then pause,end;
  119. hh=h1;hh(1,[2 1])=x;if cmpr(hh,x([2,1]),eps)<>1 then pause,end;
  120. hh=h1;hh(1,[2;1])=x;if cmpr(hh,x([2,1]),eps)<>1 then pause,end;
  121. hh=h1;hh(1,:)=x;if cmpr(hh,x,eps)<>1 then pause,end;
  122. hh=h1;hh(:,:)=x;if cmpr(hh,x,eps)<>1 then pause,end;
  123. h1=[num/den;den/num];x=-0.33+38*s;
  124. hh=h1;hh(1,1)=x;if cmpr(hh,[x;h1(2,1)],eps)<>1 then pause,end;
  125. x=[-2.67-s*8;0.8];
  126. hh=h1;hh(1:2,1)=x;if cmpr(hh,x,eps)<>1 then pause,end;
  127. hh=h1;hh(:,1)=x;if cmpr(hh,x,eps)<>1 then pause,end;
  128. hh=h1;hh(:,:)=x;if cmpr(hh,x,eps)<>1 then pause,end;
  129. hh=h1;hh([2 1],1)=x;if cmpr(hh,x([2 1]),eps)<>1 then pause,end;
  130. hh=h1;hh([2;1],1)=x;if cmpr(hh,x([2 1]),eps)<>1 then pause,end;
  131. h1=[num/den,den/num];y=0.33*s+1;x=y*y/(y+1);
  132. hh=h1;hh(1,1)=x;if cmpr(hh,[x,h1(1,2)],eps)<>1 then pause,end;
  133. x=[num/y,y*y/(y+1)];
  134. hh=h1;hh(1,1:2)=x;if cmpr(hh,x,eps)<>1 then pause,end;
  135. hh=h1;hh(1,[2 1])=x;if cmpr(hh,x(1,[2,1]),eps)<>1 then pause,end;
  136. hh=h1;hh(1,[2;1])=x;if cmpr(hh,x(1,[2,1]),eps)<>1 then pause,end;
  137. hh=h1;hh(1,:)=x;if cmpr(hh,x,eps)<>1 then pause,end;
  138. hh=h1;hh(:,:)=x;if cmpr(hh,x,eps)<>1 then pause,end;
  139. h1=[num/den;den/num];x=[num/y;y*y/(y+1)];
  140. hh=h1;hh(1:2,1)=x;if cmpr(hh,x,eps)<>1 then pause,end;
  141. hh=h1;hh(:,1)=x;if cmpr(hh,x,eps)<>1 then pause,end;
  142. hh=h1;hh(:,:)=x;if cmpr(hh,x,eps)<>1 then pause,end;
  143. hh=h1;hh([2 1],1)=x;if cmpr(hh,x([2 1],1),eps)<>1 then pause,end;
  144. hh=h1;hh([2;1],1)=x;if cmpr(hh,x([2 1],1),eps)<>1 then pause,end;
  145. //
  146. // matrix operations 
  147. //
  148. h1=[num/den,den/num];x=[0.3 1.5];
  149. if cmpr(-h1,(-1)*h1,eps)<>1 then pause,end
  150. if cmpr(h1+x,[h1(1,1)+x(1,1) h1(1,2)+x(1,2)],eps)<>1 then pause,end
  151. if cmpr(x+h1,[h1(1,1)+x(1,1) h1(1,2)+x(1,2)],eps)<>1 then pause,end
  152. if cmpr(h1-x,[h1(1,1)-x(1,1) h1(1,2)-x(1,2)],eps)<>1 then pause,end
  153. if cmpr(x-h1,[-h1(1,1)+x(1,1) -h1(1,2)+x(1,2)],eps)<>1 then pause,end
  154. h1=[num/den;den/num];x=[0.3;1.5];
  155. if cmpr(-h1,(-1)*h1,eps)<>1 then pause,end
  156. if cmpr(h1+x,[h1(1,1)+x(1,1); h1(2,1)+x(2,1)],eps)<>1 then pause,end
  157. if cmpr(x+h1,[h1(1,1)+x(1,1); h1(2,1)+x(2,1)],eps)<>1 then pause,end
  158. if cmpr(h1-x,[h1(1,1)-x(1,1); h1(2,1)-x(2,1)],eps)<>1 then pause,end
  159. if cmpr(x-h1,[-h1(1,1)+x(1,1); -h1(2,1)+x(2,1)],eps)<>1 then pause,end
  160.  
  161.  
  162. h1=[num/den,den/num];x=[0.3+s, 1.5];
  163. if cmpr(-h1,(-1)*h1,eps)<>1 then pause,end
  164. if cmpr(h1+x,[h1(1,1)+x(1,1) h1(1,2)+x(1,2)],eps)<>1 then pause,end
  165. if cmpr(x+h1,[h1(1,1)+x(1,1) h1(1,2)+x(1,2)],eps)<>1 then pause,end
  166. if cmpr(h1-x,[h1(1,1)-x(1,1) h1(1,2)-x(1,2)],eps)<>1 then pause,end
  167. if cmpr(x-h1,[-h1(1,1)+x(1,1) -h1(1,2)+x(1,2)],eps)<>1 then pause,end
  168. h1=[num/den;den/num];x=[0.3;1.5-3*s];
  169. if cmpr(-h1,(-1)*h1,eps)<>1 then pause,end
  170. if cmpr(h1+x,[h1(1,1)+x(1,1); h1(2,1)+x(2,1)],eps)<>1 then pause,end
  171. if cmpr(x+h1,[h1(1,1)+x(1,1); h1(2,1)+x(2,1)],eps)<>1 then pause,end
  172. if cmpr(h1-x,[h1(1,1)-x(1,1); h1(2,1)-x(2,1)],eps)<>1 then pause,end
  173. if cmpr(x-h1,[-h1(1,1)+x(1,1); -h1(2,1)+x(2,1)],eps)<>1 then pause,end
  174. //
  175. //
  176. h1=[num/den,den/num];
  177. if cmpr([num,den]/den,[num/den,1],eps)<>1 then pause,end
  178. if cmpr(den\[num,den],[num/den,1],eps)<>1 then pause,end
  179. if cmpr([num,den]./[den,num],h1,eps)<>1 then pause,end
  180. if cmpr([den,num].\[num,den],h1,eps)<>1 then pause,end
  181. h1=[num/den,den/num];x=[0.3 1.5];
  182. if cmpr(h1/x(1),[h1(1,1)/x(1),h1(1,2)/x(1)],eps)<>1 then pause,end
  183. if cmpr(x(1)\h1,[h1(1,1)/x(1),h1(1,2)/x(1)],eps)<>1 then pause,end
  184. if cmpr(h1./x,[h1(1,1)/x(1),h1(1,2)/x(2)],eps)<>1 then pause,end
  185. if cmpr(x.\h1,[h1(1,1)/x(1),h1(1,2)/x(2)],eps)<>1 then pause,end
  186. if cmpr(h1*x(1),[h1(1,1)*x(1),h1(1,2)*x(1)],eps)<>1 then pause,end
  187. if cmpr(h1.*x,[h1(1,1)*x(1),h1(1,2)*x(2)],eps)<>1 then pause,end
  188. h1=[num/den;den/num];
  189. if cmpr([num;den]/den,[num/den;1],eps)<>1 then pause,end
  190. if cmpr(den\[num;den],[num/den;1],eps)<>1 then pause,end
  191. if cmpr([num;den]./[den;num],h1,eps)<>1 then pause,end
  192. if cmpr([den;num].\[num;den],h1,eps)<>1 then pause,end
  193.  
  194. x=[0.3;1.5];
  195. if cmpr(h1/x(1),[h1(1,1)/x(1);h1(2,1)/x(1)],eps)<>1 then pause,end
  196. if cmpr(x(1)\h1,[h1(1,1)/x(1);h1(2,1)/x(1)],eps)<>1 then pause,end
  197. if cmpr(h1./x,[h1(1,1)/x(1);h1(2,1)/x(2)],eps)<>1 then pause,end
  198. if cmpr(x.\h1,[h1(1,1)/x(1);h1(2,1)/x(2)],eps)<>1 then pause,end
  199. if cmpr(h1*x(1),[h1(1,1)*x(1);h1(2,1)*x(1)],eps)<>1 then pause,end
  200. if cmpr(h1.*x,[h1(1,1)*x(1);h1(2,1)*x(2)],eps)<>1 then pause,end
  201. if cmpr(h1'*x,h1(1,1)*x(1)+h1(2,1)*x(2),eps)<>1 then pause,end
  202. if cmpr(h1*x',[h1(1,1)*x(1),h1(1,1)*x(2);h1(2,1)*x(1),h1(2,1)*x(2)],eps)<>1,
  203.     then pause,end
  204. h1=[num/den,den/num];x=[0.3+3*s, 1.5];
  205. if cmpr(h1/x(1),[h1(1,1)/x(1),h1(1,2)/x(1)],eps)<>1 then pause,end
  206. if cmpr(x(1)\h1,[h1(1,1)/x(1),h1(1,2)/x(1)],eps)<>1 then pause,end
  207. if cmpr(h1./x,[h1(1,1)/x(1),h1(1,2)/x(2)],eps)<>1 then pause,end
  208. if cmpr(x.\h1,[h1(1,1)/x(1),h1(1,2)/x(2)],eps)<>1 then pause,end
  209. if cmpr(h1*x(1),[h1(1,1)*x(1),h1(1,2)*x(1)],eps)<>1 then pause,end
  210. if cmpr(h1.*x,[h1(1,1)*x(1),h1(1,2)*x(2)],eps)<>1 then pause,end
  211. if cmpr(h1*x',h1(1,1)*x(1)+h1(1,2)*x(2),eps)<>1 then pause,end
  212. if cmpr(h1'*x,[h1(1,1)*x(1),h1(1,1)*x(2);h1(1,2)*x(1),h1(1,2)*x(2)],eps)<>1,
  213.     then pause,end
  214. h1=[num/den;den/num];x=[0.3+3*s; 1.5];
  215. if cmpr(h1/x(1),[h1(1,1)/x(1);h1(2,1)/x(1)],eps)<>1 then pause,end
  216. if cmpr(x(1)\h1,[h1(1,1)/x(1);h1(2,1)/x(1)],eps)<>1 then pause,end
  217. if cmpr(h1./x,[h1(1,1)/x(1);h1(2,1)/x(2)],eps)<>1 then pause,end
  218. if cmpr(x.\h1,[h1(1,1)/x(1);h1(2,1)/x(2)],eps)<>1 then pause,end
  219. if cmpr(h1*x(1),[h1(1,1)*x(1);h1(2,1)*x(1)],eps)<>1 then pause,end
  220. if cmpr(h1.*x,[h1(1,1)*x(1);h1(2,1)*x(2)],eps)<>1 then pause,end
  221. if cmpr(h1'*x,h1(1,1)*x(1)+h1(2,1)*x(2),eps)<>1 then pause,end
  222. if cmpr(h1*x',[h1(1,1)*x(1),h1(1,1)*x(2);h1(2,1)*x(1),h1(2,1)*x(2)],eps)<>1,
  223.     then pause,end
  224. h1=[num/den,den/num];x=[0.3/s,1.5-s**2/(1+s**2)];
  225. if cmpr(h1/x(1,1),[h1(1,1)/x(1,1),h1(1,2)/x(1,1)],eps)<>1 then pause,end
  226. if cmpr(x(1,1)\h1,[h1(1,1)/x(1,1),h1(1,2)/x(1,1)],eps)<>1 then pause,end
  227. if cmpr(h1./x,[h1(1,1)/x(1,1),h1(1,2)/x(1,2)],eps)<>1 then pause,end
  228. if cmpr(x.\h1,[h1(1,1)/x(1,1),h1(1,2)/x(1,2)],eps)<>1 then pause,end
  229. if cmpr(h1*x(1,1),[h1(1,1)*x(1,1),h1(1,2)*x(1,1)],eps)<>1 then pause,end
  230. if cmpr(h1.*x,[h1(1,1)*x(1,1),h1(1,2)*x(1,2)],eps)<>1 then pause,end
  231.  
  232. h1=[num/den;den/num];x=[0.3/s;1.5-s**2/(1+s**2)];
  233. if cmpr(h1/x(1,1),[h1(1,1)/x(1,1);h1(2,1)/x(1,1)],eps)<>1 then pause,end
  234. if cmpr(x(1,1)\h1,[h1(1,1)/x(1,1);h1(2,1)/x(1,1)],eps)<>1 then pause,end
  235. if cmpr(h1./x,[h1(1,1)/x(1,1);h1(2,1)/x(2,1)],eps)<>1 then pause,end
  236. if cmpr(x.\h1,[h1(1,1)/x(1,1);h1(2,1)/x(2,1)],eps)<>1 then pause,end
  237. if cmpr(h1*x(1,1),[h1(1,1)*x(1,1);h1(2,1)*x(1,1)],eps)<>1 then pause,end
  238. if cmpr(h1.*x,[h1(1,1)*x(1,1);h1(2,1)*x(2,1)],eps)<>1 then pause,end
  239. if cmpr(h1'*x,h1(1,1)*x(1,1)+h1(2,1)*x(2,1),eps)<>1 then pause,end
  240. if cmpr(h1*x',[h1(1,1)*x(1,1),h1(1,1)*x(2,1)
  241.                h1(2,1)*x(1,1),h1(2,1)*x(2,1)],eps)<>1,
  242.     then pause,end 
  243. //
  244.  
  245. h1=h1*x';x=[1 2;3 4];
  246. if cmpr(h1/x,h1*inv(x),eps)<>1 then pause,end
  247. if cmpr(x\h1,inv(x)*h1,eps)<>1 then pause,end
  248. x=[s s*s+s-1;1 s+1];xi=[1+s,1-s-s*s;-1 s];
  249. if norm(coeff(invr(x)-xi))>eps then pause,end
  250. if cmpr(h1/x,h1*xi,eps)<>1 then pause,end
  251. if cmpr(x\h1,xi*h1,eps)<>1 then pause,end
  252. if cmpr(x**(-1),xi,eps)<>1 then pause,end
  253. x=[1/(1+s) 1/(s*(s+1))-1;1 1/s];xi=[1/s,-1/(s*(s+1))+1;-1,1/(1+s)];
  254. if cmpr(invr(x),xi,eps)<>1 then pause,end
  255. if cmpr(h1/x,h1*xi,eps)<>1 then pause,end
  256. if cmpr(x\h1,xi*h1,eps)<>1 then pause,end
  257. if cmpr((1/(1+s))**3,1/((1+s)**3),eps)<>1 then pause,end
  258. x=[1/(1+s),1;0 1/s];x3=[x(1,1)**3,x(1,1)**2+x(2,2)*(x(2,2)+x(1,1));0,x(2,2)**3];
  259. if cmpr(x**3,x3,eps)<>1 then pause,end
  260.